package com.tbit.uqbike.client.controller;

import com.tbit.Version;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: chen
 * @Description:
 * @Date: 创建于 9:19 2022/9/27
 */
@RestController
@RefreshScope
public class VersionController {

    @Value("${tbit-system.version}")
    private String version;

    @RequestMapping("/version")
    public String getVersion() {

        return version;
    }

    /**
     * 心跳
     *
     * @return
     */
    @RequestMapping("/heartbeat")
    public String heartbeat() {

        return Version.getVersion();
    }

}
